<!--包含头部文件-->
{include file="public/meta" /}
<title>用户登录</title>
<body>
    <h1 style="text-align: center;">用户登录</h1>
    <input type="hidden" id="TenantId" name="TenantId" value="" />
    <div class="header"></div>
    <div class="loginWraper">
      <div id="loginform" class="loginBox">
        <form class="form form-horizontal" action="" method="post">
    
          <div class="row cl">
            <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60d;</i></label>
            <div class="formControls col-xs-8">
              <input id="" name="user_name" type="text" placeholder="账户" class="input-text size-L">
            </div>
          </div>
    
          <div class="row cl">
            <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe60e;</i></label>
            <div class="formControls col-xs-8">
              <input id="" name="user_password" type="password" placeholder="密码" class="input-text size-L">
            </div>
          </div>
    
            <div class="row cl">
              <label class="form-label col-xs-3"><i class="Hui-iconfont">&#xe6d3;</i></label>
              <div class="formControls col-xs-8">
                <input  class="input-text size-L"   type="text" id="verifycode" placeholder="请输入验证码" name="verifycode"> 
    
              <div style="margin-top: 20px"><img src="{:url('show_captcha')}" alt="captcha"  onclick="this.src=this.src"+'?'/></div>
              </div>
    </div>
    
          <div class="row cl">
            <div class="formControls col-xs-8 col-xs-offset-3">
              <label for="online">
                <input type="checkbox" name="online" id="online" value="">
                使我保持登录状态</label>
            </div>
          </div>
          <div class="row cl">
            <div class="formControls col-xs-8 col-xs-offset-3">
              <input name="" type="submit" onclick="check()" class="btn btn-success radius size-L" value="&nbsp;登&nbsp;&nbsp;&nbsp;&nbsp;录&nbsp;">
              <input name="" type="reset" class="btn btn-default radius size-L" value="&nbsp;取&nbsp;&nbsp;&nbsp;&nbsp;消&nbsp;">
              <a href="{:url('register/index')}"><input name=""  class="btn btn-default radius size-L" value="&nbsp;注&nbsp;&nbsp;&nbsp;&nbsp;册&nbsp;"></a>
              
            </div>
          </div>
        </form>
      </div>
    </div>
        <script type="text/javascript">  
            var code;//声明一个变量用于存储生成的验证码  
            document.getElementById("code").onclick=changeImg;  
            function changeImg(){  
                //alert("换图片");  
                var arrays=new Array(  
                    '1','2','3','4','5','6','7','8','9','0',  
                    'a','b','c','d','e','f','g','h','i','j',  
                    'k','l','m','n','o','p','q','r','s','t',  
                    'u','v','w','x','y','z',  
                    'A','B','C','D','E','F','G','H','I','J',  
                    'K','L','M','N','O','P','Q','R','S','T',  
                    'U','V','W','X','Y','Z'               
                );  
                code='';//重新初始化验证码  
                //alert(arrays.length);  
                //随机从数组中获取四个元素组成验证码  
                for(var i=0;i<4;i++){  
                //随机获取一个数组的下标  
                    var r=parseInt(Math.random()*arrays.length);  
                    code+=arrays[r];  
                    //alert(arrays[r]);  
                }  
                //alert(code);  
                document.getElementById('code').innerHTML=code;//将验证码写入指定区域  
            }         
              
            //效验验证码(表单被提交时触发)  
            function check(){  
                //获取用户输入的验证码  
                var input_code=document.getElementById('vcode').value;  
                //alert(input_code+"----"+code);  
                if(input_code.toLowerCase()==code.toLowerCase())  
                {  
                    //验证码正确(表单提交)  
                    return true;  
                }  
                alert("请输入正确的验证码!");  
                //验证码不正确,表单不允许提交  
                return false;  
            }  
        </script>   

<!--包含头部文件-->
{include file="public/footer" /}


</body>
</html>